/**
 * Kernel Monkeys
 * Andrew Boguk
 * Sergiy Kulyk
 * Nicholas Swartzendruber
 */

/*
 * io_dev.h
 *
 * The IO Devices are activated, then signal
 * an interrupt when their service is completed.
 *
 *  Created on: June 6, 2011
 *      Author: Nicholas Swartzendruber
 */

/*****************************************
 * Defines
 *****************************************/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif

/** The max and min wait time in ms for the service. */
#define MIN_WAIT 500
#define MAX_WAIT 2000

/** The different types of IO. */
#define DISK "Disk"
#define VIDEO "Video"
#define KEYBOARD "Keyboard"

/*****************************************
 * Typedefs
 *****************************************/
typedef struct {
        char * type;
        void (*func_ptr)();
} io_str;

typedef io_str * io_dev;

/*****************************************
 * Prototypes
 *****************************************/
io_dev io_dev_initialize(void *, char *);
void io_dev_start(io_dev);
void * io_dev_thread_start(io_dev);
void test_print_io();
